<?php
/* @var $this ResidentController */
/* @var $data Resident */
?>

<tr>

  <td>
    <?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?>
  </td>

	<td>
	<?php echo CHtml::encode($data->name); ?>
	</td>

	<td>
	<?php echo CHtml::encode($data->matric_no); ?>
	</td>

	<td>
	<?php echo CHtml::encode($data->gender); ?>
	</td>

	<td>
	<?php echo CHtml::encode($data->classification); ?>
	</td>

	<td>
	<?php echo CHtml::encode($data->nationality); ?>
	</td>

	<td>
	<?php echo CHtml::encode($data->room); ?>
	</td>

  <?php foreach($ccaList as $cca) : ?>
  <td>
    <?php 
    foreach($data->ccaResidents as $ccaResident){
      if($ccaResident->cca->id == $cca->id){
        echo "$ccaResident->point";
      }
    }

    ?>
  </td>

  <?php endforeach; ?>

	<?php /*
	<td>
	<?php echo CHtml::encode($data->email_school); ?>
	</td>

	<td>
	<?php echo CHtml::encode($data->email); ?>
	</td>

	<td>
	<?php echo CHtml::encode($data->phone); ?>
	</td>

	<td>
	<?php echo CHtml::encode($data->faculty); ?>
	</td>

	<td>
	<?php echo CHtml::encode($data->active); ?>
	</td>

	*/ ?>

</tr>
